<template>
    <div class="newproduct">
        <el-page-header @back="goBack" content="发布物品">
        </el-page-header>
        <div class="main">
            <el-form :model="form">
              <el-form-item>
                <el-input v-model="input" placeholder="请输入二手物品名称"></el-input>
              </el-form-item>
              <el-form-item>
                <el-input v-model="input" placeholder="请输入二手物品名称"></el-input>
              </el-form-item>
              <el-form-item label="您的地区">
                <el-input v-model="input" placeholder="请输入二手物品名称"></el-input>
              </el-form-item>
              <el-form-item label="物品类别">
                <div  style="display: flex; justify-content: space-between;">
                    <el-select v-model="select" placeholder="请选择类别" >
                        <el-option label="1" value="1"></el-option>
                        <el-option label="2" value="2"></el-option>
                    </el-select>
                    <el-input-number v-model="num" placeholder=""></el-input-number>
                </div>
              </el-form-item>
              <el-form-item>
                <p>上传二手物品照片</p>
                <el-upload
                    class="upload-demo"
                    drag
                    action="https://jsonplaceholder.typicode.com/posts/"
                    multiple>
                    <i class="el-icon-upload"></i>
                    <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
                </el-upload>

              </el-form-item>
            </el-form>
        </div>
    </div>
</template>
<script>
export default{
    data(){
        return{
            form:{

            }
        }
    },
    created:{

    },
    methods:{
        goBack() {
            console.log('go back');
            this.$router.back();
        }
    }
}
</script>
<style scoped>
.newproduct{
    background-color: #fff;
    padding: 15px 20px 40px;
}
.newproduct .main{
    width: 60%;
    margin: 20px auto;
}
</style>